home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / AmigaTalk / AmigaTalk.install < prev    next >
Text File  |  2000-05-09  |  9KB  |  324 lines

  1. ; -------------------------------------------------------
  2. ; Installer script for AmigaTalk V1.5
  3. ; -------------------------------------------------------
  4.  
  5. (set #welcome "This is the installer for AmigaTalk!")
  6.  
  7. (set #wrongversion
  8. (cat "You have an old version of the program 'Installer' "
  9.      "on your Amiga!\n\n"
  10.      "The installation procedure needs at least Installer 42.9."
  11.      "\n\nPlease check your System & obtain a newer version!"
  12. ))
  13.  
  14. (set #general-help 
  15. (cat "The install script will copy all %s files &"
  16.      "directories to the destination that you specify."
  17.      "Then it will add an Assign AmigaTalk: Vol:destination/"
  18.      "statement to your User-Startup file located in the "
  19.      "S: directory."
  20. ))
  21.  
  22. (set #destdir-prompt "Select a Volume & Path where AmigaTalk will be added:")
  23.  
  24. (set #destdir-help   
  25. (cat "Select the volume that you wish to place AmigaTalk in."
  26.      "Then select a directory (if any) that will serve as a "
  27.      "parent for AmigaTalk.  Example:  Select DH0: as the volume,"
  28.      "then select a directory (such as Programs) & the installer"
  29.      "will make a directory called DH0:Programs/AmigaTalk, where"
  30.      "the AmigaTalk program will be placed."
  31. ))
  32.  
  33. (set #no-diskspace "To install AmigaTalk into '%s', you need at least %ld bytes of free harddrive space!")
  34.  
  35. (set #startup-prompt "An Assign has to be added to S:User-Startup for AmigaTalk.")
  36. (set #startup-help   "AmigaTalk won't work correctly without this!")
  37.  
  38.  
  39.  
  40. ;------------------------------------------------------------------------
  41. ; Cleanup any temporary mess we created
  42. (procedure CLEANUP
  43.     ; Nothing to cleanup
  44.     (delete (tackon @default-dest ".tempinstall") (all) (optional "force"))
  45. )   ; CLEANUP
  46.  
  47.  
  48. ;------------------------------------------------------------------------
  49. ; Obtain an installation path
  50. (procedure GETPATH #gp_default #gp_remdir #gp_msg #gp_help
  51.  
  52.     (set #gp_res "")
  53.     (while (= "" #gp_res)
  54.         (set #gp_res #gp_default)
  55.         (if (not (exists #gp_res (noreq)))
  56.           (
  57.             ; Surfer 1.1 Hack:
  58.             (if (= #gp_res "Work:")
  59.               (
  60.                 (set #gp_res "")
  61.                 (set #gp_default @default-dest)
  62.               )
  63.             ) ; if
  64.  
  65.           )
  66.         ) ; if
  67.  
  68.         (if (OR (= "" #gp_res) (= @user-level 2))
  69.           (
  70.             ; We had a problem. So we need to ask the user!
  71.             (set #gp_res
  72.                 (expandpath
  73.                     (askdir
  74.                         (prompt #gp_msg)
  75.                         (help #gp_help)
  76.                         (default #gp_default)
  77.                     )
  78.                 )
  79.             )
  80.           )
  81.         ) ; if
  82.  
  83.         ; If the directory does not exist, retry!
  84.         (if (<> "" #gp_res)
  85.           (
  86.             (if (not (exists #gp_res (noreq)))
  87.                 (set #gp_res "")
  88.             ) ; if
  89.           )
  90.         ) ; if
  91.     ) ; while
  92.  
  93.     ; return the result!
  94.     (set #gp_res #gp_res)
  95.  
  96. ) ; GETPATH
  97.  
  98. ;------------------------------------------------------------------------
  99. ; We can't handle this script without Installer 42.9 or better!
  100. (if (< @installer-version 2752521)
  101.   (
  102.     ; Big problem!
  103.     (message #wrongversion)
  104.     (exit (quiet))
  105.   )
  106. )
  107.  
  108. ; find out how the user wants to install things
  109. (welcome #welcome)
  110.  
  111. (complete 0)
  112.  
  113. ; First find the Destination base:
  114.  
  115. (set #ATalkDirBase (GETPATH "Work:" TRUE #destdir-prompt #destdir-help))
  116.  
  117. ; We have to create a drawer "AmigaTalk" there!
  118. (set #ATalkDir (tackon #ATalkDirBase "AmigaTalk"))
  119.  
  120. (set @default-dest #ATalkDir)
  121.  
  122. ; If this is a new installation, we check the diskspace!
  123.  
  124.     (if (not (exists @default-dest))
  125.       (
  126.         ; For a new setup, we should leave some space!
  127.         (if (< (getdiskspace #ATalkDirBase) 2000000)
  128.             (abort (#no-diskspace #ATalkDirBase 2000000))
  129.         )
  130.  
  131.         (makedir @default-dest)
  132.  
  133.         (set #ARexxDir (tackon @default-dest "ARexxScripts"))
  134.         (makedir #ARexxDir)
  135.  
  136.         (set #BrowserDir (tackon @default-dest "Browser"))
  137.         (makedir #BrowserDir)
  138.  
  139.         (set #CDir (tackon @default-dest "C"))
  140.         (makedir #CDir)
  141.  
  142.         (set #CodeLibDir (tackon @default-dest "CodeLib"))
  143.         (makedir #CodeLibDir)
  144.  
  145.         (set #ExamplesDir (tackon @default-dest "Examples"))
  146.         (makedir #ExamplesDir)
  147.  
  148.         (set #GeneralDir (tackon @default-dest "General"))
  149.         (makedir #GeneralDir)
  150.  
  151.         (set #HelpDir (tackon @default-dest "Help"))
  152.         (makedir #HelpDir)
  153.  
  154.         (set #IntuitionDir (tackon @default-dest "Intuition"))
  155.         (makedir #IntuitionDir)
  156.  
  157.         (set #PreludeDir (tackon @default-dest "Prelude"))
  158.         (makedir #PreludeDir)
  159.  
  160.         (set #SystemDir (tackon @default-dest "System"))
  161.         (makedir #SystemDir)
  162.  
  163.         (set #TestFilesDir (tackon @default-dest "TestFiles"))
  164.         (makedir #TestFilesDir)
  165.  
  166.         (set #UserDir (tackon @default-dest "User"))
  167.         (makedir #UserDir)
  168.  
  169.         (complete 9)
  170.  
  171.         (copyfiles (prompt  "Copying ARexxScripts...")
  172.                    (help    @copyfiles-help)
  173.                    (source  "ARexxScripts")
  174.                    (dest    #ARexxDir)
  175.                    (pattern "#?.rexx")
  176.                    (files)
  177.         )
  178.  
  179.         (copyfiles (prompt  "Copying Browser...")
  180.                    (help    @copyfiles-help)
  181.                    (source  "Browser")
  182.                    (dest    #BrowserDir)
  183.                    (pattern "#?")
  184.         )
  185.  
  186.         (copyfiles (prompt  "Copying C...")
  187.                    (help    @copyfiles-help)
  188.                    (source  "C")
  189.                    (dest    #CDir)
  190.                    (pattern "#?")
  191.         )
  192.  
  193.         (copyfiles (prompt  "Copying CodeLib...")
  194.                    (help    @copyfiles-help)
  195.                    (source  "CodeLib")
  196.                    (dest    #CodeLibDir)
  197.                    (pattern "#?")
  198.         )
  199.  
  200.         (copyfiles (prompt  "Copying Examples...")
  201.                    (help    @copyfiles-help)
  202.                    (source  "Examples")
  203.                    (dest    #ExamplesDir)
  204.                    (pattern "#?.(st|p)")
  205.         )
  206.  
  207.         (complete 25)
  208.  
  209.         (copyfiles (prompt  "Copying General...")
  210.                    (help    @copyfiles-help)
  211.                    (source  "General")
  212.                    (dest    #GeneralDir)
  213.                    (pattern "#?.st")
  214.         )
  215.  
  216.         (copyfiles (prompt  "Copying Help...")
  217.                    (help    @copyfiles-help)
  218.                    (source  "Help")
  219.                    (dest    #HelpDir)
  220.                    (pattern "#?")
  221.         )
  222.  
  223.         (copyfiles (prompt  "Copying Intuition...")
  224.                    (help    @copyfiles-help)
  225.                    (source  "Intuition")
  226.                    (dest    #IntuitionDir)
  227.                    (pattern "#?.(st|p)")
  228.         )
  229.  
  230.         (complete 50)
  231.  
  232.         (copyfiles (prompt  "Copying Prelude...")
  233.                    (help    @copyfiles-help)
  234.                    (source  "Prelude")
  235.                    (dest    #PreludeDir)
  236.                    (pattern "#?")
  237.         )
  238.  
  239.         (copyfiles (prompt  "Copying System...")
  240.                    (help    @copyfiles-help)
  241.                    (source  "System")
  242.                    (dest    #SystemDir)
  243.                    (pattern "#?.(st|p)")
  244.         )
  245.  
  246.         (copyfiles (prompt  "Copying TestFiles...")
  247.                    (help    @copyfiles-help)
  248.                    (source  "TestFiles")
  249.                    (dest    #TestFilesDir)
  250.                    (pattern "#?")
  251.         )
  252.  
  253.         (copyfiles (prompt  "Copying User...")
  254.                    (help    @copyfiles-help)
  255.                    (source  "User")
  256.                    (dest    #UserDir)
  257.                    (pattern "#?")
  258.         )
  259.  
  260.         (complete 80)
  261.  
  262.         (copyfiles (prompt  "Copying Main files...")
  263.                    (help    @copyfiles-help)
  264.                    (source  "AmigaTalk.env")
  265.                    (dest    #ATalkDir)
  266.         )
  267.  
  268.         (copyfiles (prompt  "Copying Main files...")
  269.                    (help    @copyfiles-help)
  270.                    (source  "AmigaTalk.iff")
  271.                    (dest    #ATalkDir)
  272.         )
  273.  
  274.         (copyfiles (prompt  "Copying Main files...")
  275.                    (help    @copyfiles-help)
  276.                    (source  "AmigaTalk.colors")
  277.                    (dest    #ATalkDir)
  278.         )
  279.  
  280.         (copyfiles (prompt  "Copying Main files...")
  281.                    (help    @copyfiles-help)
  282.                    (source  "AmigaTalk.info")
  283.                    (dest    #ATalkDir)
  284.         )
  285.  
  286.         (copyfiles (prompt  "Copying Main files...")
  287.                    (help    @copyfiles-help)
  288.                    (source  "AmigaTalk.readme")
  289.                    (dest    #ATalkDir)
  290.         )
  291.  
  292.         (complete 83)
  293.  
  294.         (copyfiles (prompt  "Copying Main program...")
  295.                    (help    @copyfiles-help)
  296.                    (source  "AmigaTalk")
  297.                    (dest    #ATalkDir)
  298.                    (pattern "AmigaTalk")
  299.         )
  300.  
  301.         (complete 98)
  302.       )
  303.     )
  304.  
  305.  
  306. (startup    "AmigaTalk"
  307.    (prompt  "An Assign needs to be added to the \"S:user-startup\".")
  308.    (help    "AmigaTalk has to know where to find certain files.")
  309.    (command "Assign AmigaTalk: " #ATalkDir)
  310. )
  311.  
  312. ; If we have to add an Assign, we better create one right now
  313. (makeassign "AmigaTalk" #ATalkDir)
  314.  
  315. ;------------------------------------------------------------------------
  316. ; That's it!
  317.  
  318. (complete 100)
  319.  
  320. (CLEANUP)
  321. (exit)
  322.  
  323. (abort "Well, I tried!")
  324.